import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/merchant_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class MerchantEntity {
	late int code;
	late String msg;
	late List<MerchantData> data;

	MerchantEntity();

	factory MerchantEntity.fromJson(Map<String, dynamic> json) => $MerchantEntityFromJson(json);

	Map<String, dynamic> toJson() => $MerchantEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class MerchantData {
	late String id;
	@JSONField(name: "is_qq")
	late String isQq;
	@JSONField(name: "qq_num")
	late String qqNum;
	@JSONField(name: "qqs_num")
	late String qqsNum;
	@JSONField(name: "wx_num")
	late String wxNum;
	@JSONField(name: "is_qrCode")
	late String isQrcode;
	@JSONField(name: "code_url")
	late String codeUrl;
	late String name;

	MerchantData();

	factory MerchantData.fromJson(Map<String, dynamic> json) => $MerchantDataFromJson(json);

	Map<String, dynamic> toJson() => $MerchantDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}